package com.mooc.yohoshop;

import com.mooc.yohoshop.entity.BannerEntity;
import com.mooc.yohoshop.entity.BaseEntity;
import com.mooc.yohoshop.entity.BrandEntity;
import com.mooc.yohoshop.entity.CarEntity;
import com.mooc.yohoshop.entity.CategoryEntity;
import com.mooc.yohoshop.entity.CollectionOrderEntity;
import com.mooc.yohoshop.entity.CreateOrderEntity;
import com.mooc.yohoshop.entity.DelOrderEntity;
import com.mooc.yohoshop.entity.DetailEntity;
import com.mooc.yohoshop.entity.GoodsEntity;
import com.mooc.yohoshop.entity.LoadGoodsEntity;
import com.mooc.yohoshop.entity.MenuEntity;
import com.mooc.yohoshop.entity.OrderDetailEntity;
import com.mooc.yohoshop.entity.OrderEntity;
import com.mooc.yohoshop.entity.PaySignEntity;
import com.mooc.yohoshop.entity.SecKillGoodsEntity;
import com.mooc.yohoshop.entity.SecKillLoadGoodsEntity;
import com.mooc.yohoshop.entity.SecKillValuesEntity;
import com.mooc.yohoshop.entity.SuccessEntity;
import com.mooc.yohoshop.entity.TokenEntity;
import com.mooc.yohoshop.entity.UpdateOrderEntity;
import com.mooc.yohoshop.entity.UserEntity;
import com.mooc.yohoshop.entity.VerifyCodeEntity;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.POST;

public interface ApiService {

    //获取token接口
    @POST("sysToken/getToken")
    Observable<TokenEntity>requestToken(@Body RequestBody body);
    //获取banner接口
    @POST("banner/homebanner")
    Observable<BannerEntity>requestBanner();
    //推荐商品
    @POST("goods/recommendGoods")
    Observable<GoodsEntity>requestHomeGoods(@Body RequestBody body);
    //上拉加载推荐商品
    @POST("goods/recommendGoods")
    Observable<LoadGoodsEntity>requestLoadHomeGoods(@Body RequestBody body);
    //商品详情
    @POST("goods/goodsValues")
    Observable<DetailEntity>requestDetail(@Body RequestBody body);
    //推荐品牌
    @POST("brand/brandList")
    Observable<BrandEntity>requestHomeBrand();
    //分类
    @POST("goods/categoryList")
    Observable<CategoryEntity>requestCategory(@Body RequestBody body);
    //左侧菜单
    @POST("goods/menuList")
    Observable<MenuEntity>requestMenu();
    //秒杀列表
    @POST("goods/secKill")
    Observable<SecKillGoodsEntity>requestSecKill(@Body RequestBody body);
    @POST("goods/secKill")
    Observable<SecKillLoadGoodsEntity>requestSecKillLoad(@Body RequestBody body);
    //秒杀详情
    @POST("goods/secKillValues")
    Observable<SecKillValuesEntity>requestSecKillValues(@Body RequestBody body);
    //购物车列表
    @POST("car/selCars")
    Observable<CarEntity>requestSelCars(@Body RequestBody body);
    //添加购物车
    @POST("car/addCar")
    Observable<SuccessEntity>requestInsertCar(@Body RequestBody body);
    //批量添加购物车
    @POST("car/addCars")
    Observable<SuccessEntity>requestInsertCars(@Body RequestBody body);
    //删除购物车
    @POST("car/delCar")
    Observable<SuccessEntity>requestDelCar(@Body RequestBody body);
    //修改购物车
    @POST("car/updateCar")
    Observable<SuccessEntity>requestUpdateCar(@Body RequestBody body);
    //生成订单
    @POST("order/createOrder")
    Observable<CreateOrderEntity>requestCreateOrder(@Body RequestBody body);
    //获取支付宝签名
    @POST("pay/getPaySign")
    Observable<PaySignEntity>requestPaySign(@Body RequestBody body);
    //修改订单状态
    @POST("order/updateOrder")
    Observable<UpdateOrderEntity>requestUpdateOrder(@Body RequestBody body);
    //获取订单详情
    @POST("order/selOrderValues")
    Observable<OrderDetailEntity>requestDetailOrder(@Body RequestBody body);
    //获取订单列表
    @POST("order/selOrder")
    Observable<OrderEntity>requestOrderList(@Body RequestBody body);
    //校验支付结果
    @POST("order/collectionOrder")
    Observable<CollectionOrderEntity>requestCheckPay(@Body RequestBody body);
    //删除订单
    @POST("order/delOrder")
    Observable<DelOrderEntity>requestDelOrder(@Body RequestBody body);
    //获取验证码
    @POST("user/verifyCode")
    Observable<VerifyCodeEntity>requestVerifyCode(@Body RequestBody body);
    //验证码登录
    @POST("user/verifyCodeLogin")
    Observable<UserEntity>requestVerifyCodeLogin(@Body RequestBody body);
    //账号密码登录
    @POST("user/login")
    Observable<UserEntity>requestNamePwd(@Body RequestBody body);
    //获取用户详情
    @POST("user/user")
    Observable<UserEntity>requestValues(@Body RequestBody body);
}
